	

    texture left;
    sampler sLeft = sampler_state
    {
            texture = <left>;
            magfilter = POINT;
            minfilter = POINT;
            mipfilter = POINT;
            AddressU  = CLAMP;
            AddressV  = CLAMP;
    };
     
    texture right;
    sampler sRight = sampler_state
    {
            texture = <right>;
            magfilter = POINT;
            minfilter = POINT;
            mipfilter = POINT;
            AddressU  = CLAMP;
            AddressV  = CLAMP;
    };
     
    struct VS_INPUT
    {
            float3 Pos : POSITION;
            float2 Tex : TEXCOORD0;
    };
     
    struct VS_OUTPUT
    {
            float4 Pos : POSITION;
            float2 Tex : TEXCOORD0;
    };
     
    void VtAnaglyph(VS_INPUT In, out VS_OUTPUT Out)
    {      
            Out.Pos = float4(In.Pos,1);
            Out.Tex = In.Tex;          
    }
     
    float4 PxAnaglyph(VS_OUTPUT In) : COLOR0
    {
        float4 colorLeft = tex2D(sLeft, In.Tex.xy);
            float4 colorRight = tex2D(sRight, In.Tex.xy);
        return float4(colorRight.r, colorLeft.g, colorLeft.b, max(colorLeft.a, colorRight.a));
    }
     
     
    technique Anaglyphs
    {
        pass p0
        {
            VertexShader = compile vs_2_0 VtAnaglyph();
            PixelShader = compile ps_2_0 PxAnaglyph();
        }
     
    }

